package com.cskaoyan.bean.bo.front.coupon;

import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 优惠券
 *
 * @author 李然
 * @date 2022/10/14
 */
@NoArgsConstructor
@Data
public class CouponBo {

    private Integer id;

    @NotBlank(message = "名称不能为空")
    private String name;

    private String desc;

    private String tag;

    @Min(value = 0, message = "总数必须大于等于0，0表示不限")
    private Integer total;

    @DecimalMin(value = "0.1", message = "满减金额必须>0")
    private BigDecimal discount;

    @DecimalMin(value = "0.1", message = "最低消费必须>0")
    private BigDecimal min;

    @Min(value = 0, message = "每人限领必须大于等于0，0表示不限")
    private Short limit;

    private Short type;

    private Short status;

    private Short goodsType;

    private Integer[] goodsValue;

    private Short timeType;

    @NotNull(message = "有效期天数不能为空")
    @Min(value = 0, message = "有效期天数必须大于0")
    private Short days;

    private Date addTime;

    private Date updateTime;

    @Future
    private Date startTime;

    @Future
    private Date endTime;

    private Boolean deleted;

    private String code;
}
